﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Data;

namespace NamingOnLessonRepositry
{
    public interface IIRepositry<T> where T : new()
    {
        DbTransaction BeginTrans();
        string GetTableName(T entity);
        int InsertData(T entity);
        int UpdateData(T entity);
        int DeleteData(T entity);
        T FindEntity(string sysid);
        /// <summary>
        /// 获取实体数据列表
        /// </summary>
        /// <param name="keyword">检索关键词</param>
        /// <returns></returns>
        DataTable GetEntityTable(string keyword);
        List<T> GetEntity(string field, string value);
        T GetEntity(string sysid);
    }
}
